//1英尺 = 30.48厘米，1英寸 = 2.54厘米
#include <stdio.h>

#define CM_TO_FEET 30.48
#define CM_TO_INCH 2.54

int main(void)
{
    double height, inches;
    int feet;

    printf("Enter a height in centimeters: ");
    while(scanf("%lf", &height) == 1 && height > 0)
    {
        feet = height / CM_TO_FEET;
        inches = (height - feet * CM_TO_FEET) / CM_TO_INCH;
        
        printf("%.1f cm = %d feet, %.1f inches\n", height, feet, inches);
        printf("Enter a height in centimeters (<= to quit): ");
    }
    puts("Bye");

    return 0;
}